package com.dd.census.mapper;

import com.dd.census.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * Mapper层接口
 * AttendanceMapper
 * @author whn
 * @date 2021/02/20
 */
@Mapper
public interface AttendanceMapper {

    /**
     * [新增]
     **/
    int insert(List<Attendance> attendance);
    int insertNew(@Param("attendances")List<Attendance> attendances );

    /**
     * [更新]
     **/
    int update(Attendance attendance);

    /**
     * [删除]
     **/
    int delete(Attendance attendance);

    /**
     * [主键查询]
     **/
    Attendance selectByKey(String id);

    /**
     * [条件查询]
     **/
    List<Attendance> selectList (Attendance attendance);

    /**
     * [分页条件查询]
     **/
    List<Attendance> selectPage (@Param("attendance") Attendance attendance);

    /**
     * [总量查询]
     **/
    int total(Attendance attendance);


    /**
     * 本月应提成
     */
    List<Attendance> nowMonthTakes (Attendance attendance);

    /**
     * 本月实际提成
     */
    List<Attendance> nowMonthActual (Attendance attendance);
}